<%--
  Created by IntelliJ IDEA.
  User: lx
  Date: 2021-03-08
  Time: 9:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <title></title>
    <!-- 引入bootstrap -->
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap-datetimepicker.min.css">
    <link rel="stylesheet" type="text/css" href="/css/custom.css">
    <!-- 引入JQuery  bootstrap.js-->
    <script src="/js/jquery-3.2.1.min.js"></script>
    <script src="/js/bootstrap.min.js"></script>
    <script src="/js/bootstrap-datetimepicker.min.js"></script>
    <script src="/js/bootstrap-datetimepicker.zh-CN.js"></script>
</head>
<body>
    <!-- 顶栏 -->
    <jsp:include page="top.jsp"></jsp:include>
    <!-- 中间主体 -->
    <div class="container" id="content">
        <div class="row">
            <jsp:include page="menu.jsp"></jsp:include>
            <div class="col-md-10">
                <div class="panel panel-default">
                    <div class="panel-title">
                        <ol class="breadcrumb breadcrumbReset">
                            <li><a href="/admin/userList">用户管理</a></li>
                            <li class="active">新增缴费</li>
                        </ol>
                    </div>
                    <div class="panel-body">
                        <form class="form-horizontal" role="form" action="/admin/userFee" id="feeFrom" method="post">
                            <div class="form-group">
                                <label for="userID" class="col-sm-2 control-label">编号</label>
                                <div class="col-sm-10">
                                    <input type="number" class="form-control" id="userID" name="userID" placeholder="请输入编号"
                                    <c:if test='${user!=null}'>
                                           value="${user.userID}"
                                    </c:if>>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="userName" class="col-sm-2 control-label">姓名</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" disabled id="userName" name="userName" placeholder="请输入姓名"
                                    <c:if test='${user!=null}'>
                                           value="${user.userName}"
                                    </c:if>>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="balance" class="col-sm-2 control-label">账户余额</label>
                                <div class="col-sm-10">
                                    <input type="number" class="form-control" id="balance" name="balance" disabled
                                    <c:if test='${user!=null}'>
                                           value="${user.balance != null ? user.balance : 0.00}"
                                    </c:if>>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="amount" class="col-sm-2 control-label">缴费金额</label>
                                <div class="col-sm-10">
                                    <input type="number" class="form-control" id="amount" name="amount" placeholder="请输入缴费金额">
                                </div>
                            </div>
                            <div class="form-group" style="text-align: center">
                                <button class="btn btn-default" type="submit" id="btnSubmit">提交</button>
                                <button class="btn btn-default" type="reset" onclick="location.href='/admin/userList'">取消</button>
                            </div>
                        </form>
                    </div>

                </div>

            </div>
        </div>
    </div>
    <div class="container" id="footer">
        <div class="row">
            <div class="col-md-12"></div>
        </div>
    </div>
</body>
<script type="text/javascript">
    $("#nav li:nth-child(2)").addClass("active");
    $(document).ready(function () {
        $("#userID").attr("disabled",true);
        $("#btnSubmit").click(function () {
            $("#userID").attr("disabled",false);
        })
    })
</script>
</html>
